package leihua.crm.workbench.service.impl;

import leihua.crm.workbench.domain.Contacts;
import leihua.crm.workbench.mapper.ContactsMapper;
import leihua.crm.workbench.service.ContactsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author leiHua
 * @Date 2022/10/24 23:31
 */
@Service
public class ContactsServiceImpl implements ContactsService {
    @Autowired
    ContactsMapper contactsMapper;

    @Override
    public List<Contacts> queryContactsByContactsName(String contactsName) {
        return contactsMapper.selectContactsByContactsName(contactsName);
    }

    @Override
    public List<Contacts> queryContactsForPageByCondition(Map map) {
        return contactsMapper.selectContactsForPageByCondition(map);
    }

    @Override
    public int queryCountOfContactsByCondition(Map map) {
        return contactsMapper.selectCountOfContactsByCondition(map);
    }

    @Override
    public List<Contacts> queryContactsOfCustomerByCustomerId(String customerId) {
        return contactsMapper.selectContactsOfCustomerByCustomerId(customerId);
    }
}
